package com.zhxy.util.web;

import java.security.Principal;
import java.util.Enumeration;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

@SuppressWarnings("rawtypes")
public abstract class HttpServletRequestAdapter extends ServletRequestAdapter implements
		HttpServletRequest {

	@Override
	public String getAuthType() {
		return getHttpServletRequest().getAuthType();
	}

	@Override
	public Cookie[] getCookies() {
		return getHttpServletRequest().getCookies();
	}

	@Override
	public long getDateHeader(String name) {
		return getHttpServletRequest().getDateHeader(name);
	}

	@Override
	public String getHeader(String name) {
		return getHttpServletRequest().getHeader(name);
	}

	@Override
	public Enumeration getHeaders(String name) {
		return getHttpServletRequest().getHeaders(name);
	}

	@Override
	public Enumeration getHeaderNames() {
		return getHttpServletRequest().getHeaderNames();
	}

	@Override
	public int getIntHeader(String name) {
		return getHttpServletRequest().getIntHeader(name);
	}

	@Override
	public String getMethod() {
		return getHttpServletRequest().getMethod();
	}

	@Override
	public String getPathInfo() {
		return getHttpServletRequest().getPathInfo();
	}

	@Override
	public String getPathTranslated() {
		return getHttpServletRequest().getPathTranslated();
	}

	@Override
	public String getContextPath() {
		return getHttpServletRequest().getContextPath();
	}

	@Override
	public String getQueryString() {
		return getHttpServletRequest().getQueryString();
	}

	@Override
	public String getRemoteUser() {
		return getHttpServletRequest().getRemoteUser();
	}

	@Override
	public boolean isUserInRole(String role) {
		return getHttpServletRequest().isUserInRole(role);
	}

	@Override
	public Principal getUserPrincipal() {
		return getHttpServletRequest().getUserPrincipal();
	}

	@Override
	public String getRequestedSessionId() {
		return getHttpServletRequest().getRequestedSessionId();
	}

	@Override
	public String getRequestURI() {
		return getHttpServletRequest().getRequestURI();
	}

	@Override
	public StringBuffer getRequestURL() {
		return getHttpServletRequest().getRequestURL();
	}

	@Override
	public String getServletPath() {
		return getHttpServletRequest().getServletPath();
	}

	@Override
	public HttpSession getSession(boolean create) {
		return getHttpServletRequest().getSession(create);
	}

	@Override
	public HttpSession getSession() {
		return getHttpServletRequest().getSession();
	}

	@Override
	public boolean isRequestedSessionIdValid() {
		return getHttpServletRequest().isRequestedSessionIdValid();
	}

	@Override
	public boolean isRequestedSessionIdFromCookie() {
		return getHttpServletRequest().isRequestedSessionIdFromCookie();
	}

	@Override
	public boolean isRequestedSessionIdFromURL() {
		return getHttpServletRequest().isRequestedSessionIdFromURL();
	}

	@SuppressWarnings("deprecation")
	@Override
	public boolean isRequestedSessionIdFromUrl() {
		return getHttpServletRequest().isRequestedSessionIdFromUrl();
	}

	protected abstract HttpServletRequest getHttpServletRequest();
}
